package routers

import (
	"github.com/gin-gonic/gin"
	"reggie/controller"
	"reggie/service"
)

func EmployeeRouter(g *gin.RouterGroup)  {

	// POST - lognin
	g.POST("/login", controller.EmployeeLoginController)

	// POST - logout
	g.POST("/logout", controller.EmployeeLogoutController)

	// GET - list by page
	//http://127.0.0.1:8001/v1/employee/page?page=1&pageSize=10
	g.GET("/page", controller.EmployeePageController)

	// 查询员工信息
	//Request URL: http://127.0.0.1:8001/v1/employee/1
	//Request Method: GET
	g.GET("/:id", service.EmployeeFindById)

	// 修改员工信息
	//Request URL: http://localhost:8080/employee
	//Request Method: PUT
	g.PUT("", controller.EmployeeUpdateByConditions)

}


